Protocol for weaning of noninvasive ventilation